n=int(input("请输入一个数字:"))
if n>=1 and n<=9:
    for i in range(1,n+1):
        print('   '*(9-i), end = '') 
        for j in range(1,i+1):
            print('{}*{}={} '.format(i,j,i*j),end='')
        print()
else:
    print("请输入1-9以内任意数字")
